import React from 'react';
import {HashRouter,Switch,Route} from "react-router-dom"
import './App.css';
class Home extends React.Component{
  constructor(props){
    super(props)
  }
  render(){
    return(
      <div>
        我是home组件
      </div>
    )
  }
}
class List extends React.Component{
  constructor(props){
    super(props)
  }
  render(){
    return(
      <div>
        我是list组件
      </div>
    )
  }
}
class App extends React.Component{
  constructor(props){
    super(props)
  }
  render(){
    console.log(this)
    return(
      <div>
        <HashRouter>
          <Switch>
            <Route exact path="/" component={Home}></Route>
            <Route  path="/home" component={Home}></Route>
            <Route  path="/list" component={List}></Route>
          </Switch>
        </HashRouter>
      </div>
    )
  }
}

export default App;
